<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php $this->load->view('head'); ?>
	<script type="text/javascript">
		jQuery(document).ready(function() {
			//jQuery("input[name=startdate]").datetimepicker({timeFormat: 'hh:mm', dateFormat: 'yy-mm-dd'});
			AnyTime.picker( "startdate",
					{ format: "%z-%m-%d", firstDOW: 1 } );
		});
	</script>
</head>

<body>
	<?php
	if ($user->id > 0) {
		$this->load->view('header_logged.php');
	} else {
		$this->load->view('header_guest.php');
	}
	?>
	
	<!-- Content Area -->
	<div class="wrapper-world content">
		<div class="wrapper">
			<h1>Term Based Bus Hire</h1>
			
			<div class="conv-right">
				<div class="avatar"></div>
				<div class="transparent">
					<div class="top"><div class="bot"><div class="mid" id="mid">
						<p class="justified">
							This is a contractual service typically used for routine or scheduled services. Commonly hired by companies providing transportation for their working staff to and from their office or factory location to a MRT station or any pre-designated drop-off location along the scheduled Route. Prices are charged monthly at a contractual rate. To aid us in preparing your quotation, Please provide essential information such as
						</p>
						<ol>
							<li>Number of work days per week</li>
							<li>Pick-up & Drop-off timings</li>
							<li>Locations or exact addresses</li>
							<li>Number of passengers</li>
							<li>Expected Commencement Date</li>
							<li>Duration of Service.</li>
						</ol>
						<p class="justified">
							<strong>If you already have an itinerary, you may upload <?php echo anchor('/request/upload-itinerary', 'here'); ?>.</strong>
						</p>
					</div></div></div>
					<div class="clr"></div>
				</div>
			</div>
		</div>
	</div> <!-- end of wrapper-world and .content -->	
	
	<div class="wrapper">
		<div class="conv-left">
			<div class="avatar"></div>
			<div class="mid"><div class="top"><div class="bot">
			<?php echo form_open('request/jobOrder', array('class' => 'left-aligned', 'id' => 'jobOrder')); ?>
				<input type="hidden" name="draft" value="0" />
				<input type="hidden" name="type" value="term" />
				<input type="hidden" name="orderId" id="orderId" value="<?php echo $orderId; ?>" />
				<div class="one">
					<label for="startdate">My expected start date:</label>
					<div class="type-text"><input type="text" name="startdate" id="startdate" value="<?php if ($orderId > 0 && count($jobs) > 0) { $date = explode(" ", $jobs[0]->start_date); echo $date[0]; } ?>" /></div>
					<div class="clr"></div>
				</div>
				<div class="one">
					<label>I would like to supply the following information:</label>
					<div class="type-textarea"><textarea name="moreinfo"><?php if ($orderId > 0) { echo htmlspecialchars($job->moreinfo); } ?></textarea></div>
					<div class="clr"></div>
				</div>		
			</form>
			</div></div></div>
			<div class="clr"></div>
		</div>
	</div>
	
	<div class="wrapper">
		<div class="action-buttons">
			<?php
			if ($user->level > 0) {
				$sendText = 'Add Order';
			}
			?>
			<?php if ((!isset($orderId) || !($orderId > 0)) && $user->level < 1): ?><a class="more" href="javascript:jobOrder(1);"><span>Save as draft</span></a> <?php endif; ?><a class="more" href="javascript:jobOrder();"><span><?php echo $sendText; ?></span></a>
		</div>
	</div>
	
	<div class="wrapper-world footer-top">
		<div class="wrapper"></div>	
	</div>
	
	<?php $this->load->view('footer'); ?>
</body>
</html>
